<?php
class Persona {
	public $nombre;
	public $fecha_nacimiento;
	public $pais;
	public $valid;
	private $bd;
	
	public function __construct(){
		$bd = new BaseDatos();
	}
	
	public function afegir($id,$tipus){
		$sql="";
		$command=$bd->prepare($sql);
		$command=$command->execute();
		$row=$command->rowCount();
		if ( $row <= "0" ) return "Error";
		else return $row;
	}
	
	public function modificar($id,$tipus){
		$sql="";
		$command=$bd->prepare($sql);
		$command=$command->execute();
		$row=$command->rowCount();
		if ( $row <= "0" ) return "Error";
		else return $row;
	}
	
	public function borrar($id,$tipus){
		$sql="";
		$command=$bd->prepare($sql);
		$command=$command->execute();
		$row=$command->rowCount();
		if ( $row <= "0" ) return "Error";
		else return $row;
	}
	
	public function getPersona($id,$tipus){
		$sql="";
		$command=$bd->prepare($sql);
		$command=$command->execute();
		$row=$command->rowCount();
		if ( $row < "0" || $row > "1" ) return "Error";
		else return $command->fetch(PDO::FETCH_ASSOC);
	}
}